/*
 * serial.h
 *
 *  Created on: Sep 25, 2014
 *      Author: amorim
 */

#ifndef SERIAL_H_
#define SERIAL_H_

class SerialConnection;

class SerialConnection {

	int fd;

public:
	int openSerialPort(const char * device) ;

	void tx_message(int fd, int mlen, const char * dat);

	void printBuf(char * buf, int bufLen);

	int rx_message(int fd, char * dat, int size);

	void close(int f);

};
#endif /* SERIAL_H_ */
